package com.itheima.domain.db;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

//用户类
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_user")
public class User implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;//用户id
    @TableField(value = "phone")
    private String phone; //手机号
    @TableField(value = "password")
    private String password; //密码

    @TableField(fill = FieldFill.INSERT) //插入时自动填充
    private Date created;//创建时间
    @TableField(fill = FieldFill.INSERT_UPDATE)//插入和更新时自动更新
    private Date updated;//更新时间
}